package com.yln.ffmpeg;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

public class JniActivity extends AppCompatActivity {

    static {
        System.loadLibrary("ffmpeg-cmd");
    }

    public native String stringFromJNI();

    public native int sum(int a,int b);

    private TextView textView;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_jni);
        textView=findViewById(R.id.content_text);
        textView.setText(stringFromJNI());
        int result=sum(5,10);
        textView.setText("sum result:"+result);
    }
}
